package cn.wenhe9.yygh.cmn.client;

import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.stereotype.Component;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;

/**
 * @author DuJinliang
 * 2022/3/29
 */
@FeignClient(value = "service-cmn", path = "/admin/cmn/dict")
@Component
public interface DictFeignClient {
    /**
     * 根据dictCode和value查询
     * @param dictCode String
     * @param value String
     * @return ResultResponse
     */
    @GetMapping("/name/{dictCode}/{value}")
    String getName(
            @PathVariable(name = "dictCode") String dictCode,
            @PathVariable(name = "value") String value
    );

    /**
     * 根据value查询
     * @param value String
     * @return ResultResponse
     */
    @GetMapping("/name/{value}")
    String getName(
            @PathVariable(name = "value") String value
    );
}
